import Layout from '@/Layout'

const componentRouter = {
  path: '/component',
  component: Layout,
  name: 'Component',
  meta: { title: '组件', icon: 'file-tree', iconType: 'mdi' },
  children: [
    {
      path: '/searchComponent',
      name: 'SearchComponent',
      meta: { title: '搜索组件', icon: 'search', rightList: ['superadmin', 'admin', 'user'] },
      component: () => import('views/component/searchComponent')
    },
    {
      path: '/operationComponent',
      name: 'OperationComponent',
      meta: { title: '操作组件', icon: 'operation', rightList: ['superadmin', 'admin', 'user'] },
      component: () => import('views/component/operationComponent')
    },
    {
      path: '/dialogComponent',
      name: 'DialogComponent',
      meta: { title: '弹窗组件', icon: 'dialog' },
      component: () => import('views/component/dialogDemo'),
      rightList: ['superadmin', 'admin', 'user']
    },
    {
      path: '/formComponent',
      name: 'FormComponent',
      meta: { title: '表单组件' /* icon: 'form' */ },
      component: () => import('views/component/form/index'),
      rightList: ['superadmin', 'admin', 'user'],
      children: [
        {
          path: '/normalForm',
          name: 'NormalForm',
          meta: { title: '默认表单' /* icon: 'formNormal' */ },
          component: () => import('views/component/form/normalForm')
        },
        {
          path: '/leftForm',
          name: 'LeftForm',
          meta: { title: '左右表单' /* icon: 'formLeft' */ },
          component: () => import('views/component/form/leftForm')
          // rightList: ['views', 'add', 'edit', 'del']
        }
      ]
    },
    {
      path: '/tableComponent',
      name: 'TableComponent',
      meta: { title: '表格组件', icon: 'table' },
      component: () => import('views/component/table/index'),
      children: [
        {
          path: '/normalTable',
          name: 'NormalTable',
          meta: { title: '默认表格', icon: 'table' },
          component: () => import('views/component/table/normalTable')
          // rightList: ['views', 'add', 'edit', 'del']
        }
      ]
    }
  ]
}

export default componentRouter
